<?php	

require_once("config_inc.php");

require_once("core/user_api.php");
require_once("core/share_api.php");

session_start();

if(!is_active_user_session()) 
{
	header("Location: " . SERVER_URL . "login"); 
 	exit();
}

$db = new database();
$db->connect();

$share_api = new share_api($db);
$project_data = $share_api->get_project($_GET["project_id"]);

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<?php require_once("meta_inc.php"); ?>
<script type="text/javascript" src="<?=SERVER_URL?>js/jquery.validate.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {	
	
});
</script>
</head>
<body>

<?php require_once("topbar_inc.php"); ?> 

<div class="wrapper" style="margin-top:80px">
	
    <div class="left-column-right">
    	<div class="small-white-page">xc</div>
    </div>
        
    <div class="right-column-right">
    	<div class="input-form big-white-page">
        
			<form action="<?=SERVER_URL?>edit/<?=$_GET["project_id"]?>" method="post">
				<table cellspacing="7" cellpadding="2">
				<tr>
					<td>project name</td>
					<td>
						<div><?=$project_data["PRJ_NAME"]?>
							<a href="#" style="float:right"><img src="<?=SERVER_URL?>gfx/icon_edit.png" alt="edit" /></a>
						</div>
						<div>
							<input type="text" placeholder="project name" name="project_name" value="<?=$project_data["PRJ_NAME"]?>" />
						</div>
					</td>
					<td></td>
				</tr>
				<tr>
					<td>
						<input type="submit" value="update project" />
						<input type="submit" value="cancel" />
					</td>
				</tr>
				</table>
			</form>
              		                            
        </div>
    </div>

    <div class="clear"></div>
        
</div>    

<?php require_once("bottombar_inc.php"); ?>	

</body>
</html>
<?php $db->close(); ?>